package com.example.harmonys_api.controller;

import com.example.harmonys_api.entity.Result;
import com.example.harmonys_api.entity.User;
import com.example.harmonys_api.service.ITypeService;
import com.example.harmonys_api.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 2251300221陈成权
 * @since 2025-09-30
 */
@RestController
public class TypeController {
    @Autowired
    ITypeService iTypeService;
    @GetMapping("/types")
    public Result typeList() {
        //http://127.0.0.1:8080/v1/users
        System.out.println("进入了TypeControllerr 的typeList方法");
        //List<User> list1 = iUserService.list();
        return iTypeService.getAllType();
    }
}
